\documentclass[12pt]{article}
\usepackage{calc,fancyhdr}
\usepackage[hmargin=.5in,vmargin=.75in,
            footskip=.25in,headsep=.5in-\headheight]{geometry}

% Template solution to Exercise 5.

% Common formatting macros for CSC165.
\usepackage{amsmath,amssymb}
\input{macros-165}

% Page layout: stretch text to fill up page.
\flushbottom

% Headings.
\pagestyle{fancy}
\let\headrule\empty
\let\footrule\empty
\lhead{CSC\,165\,H1S}
\chead{Homework Exercise \#\,6}
\rhead{Winter 2014}

\begin{document}

\begin{large}
  \noindent
  Name: Robert Staskiewicz \hfill CDF login name: c3staski\\[0.5cm]
  Partner: Ekam Shahi    \hfill CDF login name: c3shahie
\end{large}

\medskip

\noindent
\rule{\textwidth}{.5pt}

\subsection*{Topic: Proofs II}

\medskip

\begin{enumerate}
 
       
    % place solution to question 1 below

    \item
    \medskip
    \noindent
    Consider the following claim:
    \begin{quote}
    for $x \in \R,$ if $x^2+2x-3\geq0$ then $(x\leq-3)\lor (x\geq1)$
    \end{quote}
    We can express this in the notation of symbolic logic as:
    $$ \ \forall x \in \R,\ (x^2+2x-3x) \implies [(x\leq-3)\lor (x\geq1)]  $$
    {\bf Proof:} \\
    \begin{pindent}

        \begin{assumption}{$x^2+2x-3x\geq 0$}
		Then $x^2+2x-3x=(x+3)(x-1)$\\
		Then $(x+3)(x-1)\geq 0$\\
		Then $[[(x+3) \geq 0] \land [(x-1) \geq 0]] \lor  [[(x+3) \leq 0] \land [(x-1) \leq 0]]$\\\just{Both terms need to be positive or negative in order for their product to be positive.}\\
		Case 1:\\ $ [(x+3) \geq 0] \land [(x-1) \geq 0] $\\
		Then $(x\geq -3) \land (x \geq 1)$\\
		Then $x\geq 1$ \just{$(x\geq 1) \implies (x\geq -3)$}\\\\
		Case 2:\\ $[[(x+3) \leq 0] \land [(x-1) \leq 0]]$\\
		Then $(x\leq-3) \land (x\leq1)$\\
		Then $ x\leq -3 $ \just{$(x\leq 3) \implies (x\leq1)$}\\\\
		So, $ [(x+3)(x-1)\geq 0] \implies [(x\leq-3) \lor (x\geq 1)] $\just{Proof by cases.}\\
		Then $(x+3)(x-1)= x^2+2x-3x$
		
        \end{assumption}
        Therefore $ \ \forall x \in \R,\ (x^2+2x-3x) \implies [(x\leq-3)\lor (x\geq1)]  $
    \end{pindent}
    \medskip
    
    % place solution to question 2 below

    \item
    Consider the following claim:\\
    \begin{quote} 
    if $a$ is an integer then $a^5-a$ is divisible by 5\\
    \end{quote}
    We can express this in the notation of symbolic logic as:
    $$\forall a \in \Z, a \in \Z \implies [5\mid (a^5-a)]  $$ \\
    {\bf Proof:} \\
    \begin{pindent}

            \begin{assumption}{$a=0$}
                Base Case: $0^5-0=0$ \just{True, $5|0$.}\\\\
                Assume $(a^5-a)=5m$\\
                Then $((a+1)^5-(a+1)=a^5+5a^4+10a^3+10a^2+5a+1-a-1$\\
                Then $((a+1)^5-(a+1))=a^5+5a^4+10a^3+10a^2+5a-a $\\
                Then $((a+1)^5-(a+1))=a^5-a+5a^4+10a^3+10a^2+5a $\\
                Then $((a+1)^5-(a+1))=(a^5-a)+5(a^4+2a^3+2a^2+a) $\\
                Then $5|(a^5-a)$ \just{We assumed $(a^5-a)=5m,\ 5|5m$}\\
                And $5|5(a^4+2a^3+2a^2+a)$ \just{5 is a factor of $5a^4+10a^3+10a^2+5a$}\\
                Then $[(5|(a^5-a)) \land (5|5(a^4+2a^3+2a^2+5a))] \implies [5|((a+1)^5-(a+1))]$\\
                We assumed a was correct.\\
                Then derived $a+1$ is correct.
            \end{assumption}
            Therefore by the principle of mathematical induction, $\forall a \in \Z, a \in \Z \implies [5\mid (a^5-a)]  $
        \end{pindent}
        \medskip
       
    \item
    Consider the following claim:\\
    \begin{quote}
    if $n-1, n$ and $n+1$ are consecutive positive integers, then the cube of the largest cannot be equal to the sum of the cubes of the other two.
    \end{quote}
    We can express this in the notation of symbolic logic as:
    $$\forall a \in \Z, [(n-1) \land n \land (n+1)] \implies [(n+1)^3 \not= [n^3 + (n-1)^3]] $$ \\
		{\bf Proof:} \\
		    \begin{pindent}
		
          \begin{assumption}{$(n+1)^3=n^3+(n-1)^3$}
				Then $(n+1)^3=n^3+3n^2+3n+1$\\
				And $n^3+(n-1)^3=n^3+n^3-3n^2+3n-1$\\
				Then $n^3+3n^2+3n+1= n^3+n^3-3n^2+3n-1$\\
				Then $n^3+3n^2+3n+1= 2n^3-3n^2+3n-1$\\
				Then $n^3-6n^2-2=0$\\
				Then $n^2(n-6)-2=0$\\
				Then $n^2(n-6)=2$\\
				Then $(n^2>0) \land ((n-6)>0)$ \just{Both products mut be positive.}\\
				Then $n^2>0$\ is always true. \just{The square of any number is positive.}\\
				Then we have $(n-6)>0$ \just{This term must be positive for the product to be positive.}
				Then $n>6$ \just{Adding 6 to both sides. }\\
				Then $(n>6) \implies [n^2>36)]$\\
				But $[(n^2>36)\land (n>6)] \implies [n^2(n-6) \not=2]$\\
				We reach a contradiction. Thus, our original implication is true.
          \end{assumption}
          Therefore,$\forall a \in \Z, [(n-1) \land n \land (n+1)] \implies [(n+1)^3 \not= [n^3 + (n-1)^3]] $
           
      \end{pindent}
      \medskip

\end{enumerate}

\noindent
\rule{\textwidth}{.5pt}

\end{document}
